let students = [
    {
        name: '张三',
        age: '18',
        sex: 'man',
        hobby: 'ball'
    }, {
        name: '张三1',
        age: '18',
        sex: "男",
        hobby: '养马'
    }, {
        name: '张三2',
        age: '18',
        sex: "男",
        hobby: '汤头'
    }, {
        name: '张三3',
        age: '18',
        sex: "男",
        hobby: '抽烟'
    }, {
        name: '张三4',
        age: '19',
        sex: "女",
        hobby: '篮球'
    }
]
const http = require('http');
const template = require('art-template');
const path = require('path');
const app = http.createServer();
app.on('request', (req, res) => {
    let html = template(path.join(__dirname, './public/student.html'), { students: students });
    res.end(html);
})
app.listen(80, () => {
    console.log('start server');
});